package com.mytest.DynamicProxy;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class LOLMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println("proxy start TGP开始优化游戏环境...");
        Object result = methodProxy.invokeSuper(o,objects);
        System.out.println("proxy end 游戏已正常启动...");
        return result;
    }
}
